package fun.aiwith.learn.peacock.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.Table;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 用户实体
 *
 * @Author: tongqianwen
 * @Date: 2025/7/23
 */
//@Entity
@Table("users")
@Data
public class User implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
//    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    //    @Column(unique = true, nullable = false)
    @Column("username")
    private String username;

    //    @Column(nullable = false)
    private String password;

    //    @CreationTimestamp
    private LocalDateTime createdAt;

    public User() {
    }

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }
}